from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait

dr = webdriver.Chrome()
dr.get("file:///C:/Users/Administrator/Desktop/自动化测试网页/自动化测试网页/注册A.html")
dr.maximize_window()
time.sleep(2)
# 显示等待
e = WebDriverWait(dr,10,1).until(lambda x:x.find_element(By.XPATH,"/html/body/div/div[2]/div[1]/input[2]"))
e.send_keys("你好")
time.sleep(2)
dr.quit()